﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_SimRelation数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_SimRelationMod
    {
        /// <summary>
        /// 初始化Base_SimRelation数据模型对象
        /// </summary>
        public Base_SimRelationMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_SimRelation数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iCCID">ICCID</param>
        /// <param name="sIMNO">SIMNO</param>
        public Base_SimRelationMod(string iCCID,string sIMNO)
        {
            //给ICCID字段赋值
            this.ICCID = iCCID;
            //给SIMNO字段赋值
            this.SIMNO = sIMNO;
        }
        /// <summary>
        /// 初始化Base_SimRelation数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iCCID">ICCID</param>
        /// <param name="sIMNO">SIMNO</param>
        /// <param name="beginTime">BeginTime</param>
        /// <param name="lastTime">LastTime</param>
        public Base_SimRelationMod(string iCCID,string sIMNO,DateTime? beginTime,DateTime? lastTime)
        {
            //给ICCID字段赋值
            this.ICCID = iCCID;
            //给SIMNO字段赋值
            this.SIMNO = sIMNO;
            //给BeginTime字段赋值
            this.BeginTime = beginTime;
            //给LastTime字段赋值
            this.LastTime = lastTime;
        }
        
		//属性存储数据的变量
        private string _iCCID;
        private string _sIMNO;
        private DateTime? _beginTime;
        private DateTime? _lastTime;
        
        /// <summary>
        /// ICCID
        /// </summary>
        public string ICCID
        {
            get { return this._iCCID; }
            set { this._iCCID = value; }
        }
        /// <summary>
        /// SIMNO
        /// </summary>
        public string SIMNO
        {
            get { return this._sIMNO; }
            set { this._sIMNO = value; }
        }
        /// <summary>
        /// BeginTime
        /// </summary>
        public DateTime? BeginTime
        {
            get { return this._beginTime; }
            set { this._beginTime = value; }
        }
        /// <summary>
        /// LastTime
        /// </summary>
        public DateTime? LastTime
        {
            get { return this._lastTime; }
            set { this._lastTime = value; }
        }
        
        /// <summary>
        /// 对比两个Base_SimRelation数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_SimRelation数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_SimRelation数据模型对象
            Base_SimRelationMod base_SimRelationMod = obj as Base_SimRelationMod;
            //判断是否转换成功
            if (base_SimRelationMod == null) return false;
            //进行匹配属性的值
            return
                //判断ICCID是否一致
                this.ICCID == base_SimRelationMod.ICCID &&
                //判断SIMNO是否一致
                this.SIMNO == base_SimRelationMod.SIMNO &&
                //判断BeginTime是否一致
                this.BeginTime == base_SimRelationMod.BeginTime &&
                //判断LastTime是否一致
                this.LastTime == base_SimRelationMod.LastTime;
        }
        /// <summary>
        /// 将当前Base_SimRelation数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_SimRelation数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ICCID进行按位异或运算处理
                (this.ICCID == null ? 2147483647 : this.ICCID.GetHashCode()) ^
                //将SIMNO进行按位异或运算处理
                (this.SIMNO == null ? 2147483647 : this.SIMNO.GetHashCode()) ^
                //将BeginTime进行按位异或运算处理
                (this.BeginTime == null ? 2147483647 : this.BeginTime.GetHashCode()) ^
                //将LastTime进行按位异或运算处理
                (this.LastTime == null ? 2147483647 : this.LastTime.GetHashCode());
        }
        /// <summary>
        /// 将当前Base_SimRelation数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_SimRelation数据模型对象转换成字符串副本
            return
                "[" +
                //将ICCID转换成字符串
                this.ICCID + "," +
                //将SIMNO转换成字符串
                this.SIMNO +
                "]";
        }
    }
}
